|
In computational complexity theory, the potential method is a method used to analyze the amortized time and space complexity of a data structure, a measure of its performance over sequences of operations that smooths out the cost of infrequent but expensive operations.〔.〕 ==Definition of amortized time== In the potential method, a function Φ is chosen that maps states of the data structure to non-negative numbers. If ''S'' is a state of the data structure, Φ(''S'') may be thought of intuitively as an amount of potential energy stored in that state;〔〔 alternatively, Φ(''S'') may be thought of as representing the amount of disorder in state ''S'' or its distance from an ideal state. The potential value prior to the operation of initializing a data structure is defined to be zero. Let ''o'' be any individual operation within a sequence of operations on some data structure, with ''S''before denoting the state of the data structure prior to operation ''o'' and ''S''after denoting its state after operation ''o'' has completed. Then, once Φ has been chosen, the amortized time for operation ''o'' is defined to be : where ''C'' is a non-negative constant of proportionality (in units of time) that must remain fixed throughout the analysis. That is, the amortized time is defined to be the actual time taken by the operation plus ''C'' times the difference in potential caused by the operation.〔〔 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Potential method」の詳細全文を読む スポンサード リンク
|